Skip to content

Conversation

@Anyitechs
Copy link
Contributor

Continues the work started in #69 by @moisesPompilio adding support for configuring the node via CLI arguments and environment variables, allowing runtime overrides of the configuration file.

I introduced ConfigBuilder to handle partial state and merging of the configuration fields, which significantly cleaned up the load_config logic.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jan 16, 2026

I've assigned @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

Adds support for configuring the node via CLI arguments and
environment variables, allowing runtime overrides of the configuration file.

- Added `clap` dependency for argument parsing.
- Implemented layered config loading: config file (full set of options) +
  environment variables + CLI arguments. Env vars and CLI args override
  values from the config file when present.
- Implemented `ConfigBuilder` to handle partial state and merging.
- Added comprehensive unit tests for precedence and validation logic.
- Updated README with usage instructions and explanation of config precedence.

Co-authored-by: moisesPomilio <[email protected]>
@Anyitechs Anyitechs marked this pull request as ready for review January 16, 2026 16:46
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @benthecarman! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants